{extend name="layout" /}
{block name="content"}
<section class="content-header">
<h1>
  我的首页
</h1>
  <li class="active">首页</li>
</section>
<section class="content">
<div class="row">
  <section class="col-lg-7 connectedSortable">
    <div class="nav-tabs-custom">
      <ul class="nav nav-tabs pull-right">
        <li class="pull-left header" style="width: 100%;"><i class="fa fa-inbox"></i> 
          <span>注册人数统计</span>
          <span style="float: right;font-size: 14px;margin-left: 20px;">当月注册人数： 
          {$list.regmon ? $list.regmon : 0}人</span>
          <span style="float: right;font-size: 14px;">总共注册人数：{$list.regtotal} 人</span>
        </li>
      </ul>
      <div class="tab-content no-padding">
        <div id="register" style="position: relative; height: 300px;"></div>
      </div>
    </div>
  </section>
</div>
</section>
{/block}
{block name="script"}
<script src="{$js_path}echarts.min.js"></script>
<script type="text/javascript">
  var myChart = echarts.init(document.getElementById('register'));
  var colors = ['#5793f3', '#d14a61', '#675bba'];
  option = {
      color: colors,
      tooltip: {
          trigger: 'none',
          axisPointer: {
              type: 'cross'
          }
      },
      legend: {
          data:['{$list.nowmon}' + ' 注册人数']
      },
      grid: {
          top: 70,
          bottom: 50
      },
      xAxis: [
          {
              type: 'category',
              axisTick: {
                  alignWithLabel: true
              },
              axisLine: {
                  onZero: true
              },
              axisPointer: {
                  label: {
                      formatter: function (params) {
                          return '注册人数  ' + params.value + '号'
                              + (params.seriesData.length ? '：' + params.seriesData[0].data + '人' : 0);
                      }
                  }
              },
              data: [{$list.x_axis}]
          }
      ],
      yAxis: [
          {
              type: 'value'
          }
      ],
      series: [
          {
              name:'{$list.nowmon}' + ' 注册人数',
              type:'line',
              smooth: true,
              data: [{$list.reginfo}]
          }
      ]
  };
  myChart.setOption(option);
</script>
{/block}